﻿using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Text;

namespace MOBAServer.Cache
{
    public class RoomCacheBase<TRoom> where TRoom:Room.RoomBase<MobaClient>
    {
        #region 基本数据
        protected int id;
        /// <summary>
        /// 房间ID对应的玩家ID
        /// </summary>
        protected ConcurrentDictionary<int, TRoom> idRoomDic = new ConcurrentDictionary<int, TRoom>();
        /// <summary>
        /// 玩家ID对应的房间ID
        /// </summary>
        protected ConcurrentDictionary<int, int> playerRoomDic = new ConcurrentDictionary<int, int>();

        /// <summary>
        /// 重用的队列
        /// </summary>
        protected ConcurrentQueue<TRoom> roomQue = new ConcurrentQueue<TRoom>();
        #endregion
    }
}
